package com.iplant.basic.service.po.bms.qft;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.basic.service.basicenum.bms.qft.BMSQualificationType;

import java.io.Serializable;

/**
 * 资质清单
 *
 * @author YouWang·Peng
 * 2023-7-23 17:47:04
 */
@DBBasePO(TableName = "bms_qualification", AutoCreateTable = true, CheckName = {"Code", "Name"}, Schemas =
        DBSchemas.Basic)
public class BMSQualification extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;//序列号

    @DBCondition
    @DBField
    public int QualificationType = 0;//资质类型(值)
    public String QualificationTypeText = "";//资质类型(文本)

    @DBField
    public int IsEnableQualification = 0;//是否启用资质
    @DBField
    public int IsEnablevalidity = 0;//是否启用有效期

    public BMSQualification() {
    }

    @JsonProperty("QualificationType")
    public int getQualificationType() {
        return QualificationType;
    }

    public void setQualificationType(int qualificationType) {
        QualificationType = qualificationType;
    }

    @JsonProperty("QualificationTypeText")
    public String getQualificationTypeText() {
        QualificationTypeText = BMSQualificationType.getEnumType(QualificationType).getLabel();
        return QualificationTypeText;
    }

    public void setQualificationTypeText(String qualificationTypeText) {
        QualificationTypeText = qualificationTypeText;
    }

    @JsonProperty("IsEnableQualification")
    public int getIsEnableQualification() {
        return IsEnableQualification;
    }

    public void setIsEnableQualification(int isEnableQualification) {
        IsEnableQualification = isEnableQualification;
    }

    @JsonProperty("IsEnablevalidity")
    public int getIsEnablevalidity() {
        return IsEnablevalidity;
    }

    public void setIsEnablevalidity(int isEnablevalidity) {
        IsEnablevalidity = isEnablevalidity;
    }
}
